
<!DOCTYPE html>
<html>
<head>
    <title>Question 0000 - Rollout 14-qwen3 - MCTS推理树可视化</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://d3js.org/d3.v7.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Arial', sans-serif;
            background: #f8f9fa;
            color: #333;
            overflow: hidden;
        }
        
        .container {
            width: 100vw;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px 30px;
            text-align: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .header h1 {
            font-size: 1.8em;
            margin: 0;
        }
        
        .tree-container {
            flex: 1;
            background: white;
            position: relative;
        }
        
        .node {
            cursor: pointer;
        }
        
        .node circle {
            fill: #fff;
            stroke-width: 2px;
            r: 20;
        }
        
        .node.U circle { fill: #e3f2fd; stroke: #2196f3; }
        .node.TS circle { fill: #e8f5e8; stroke: #4caf50; }
        .node.DA circle { fill: #fff3e0; stroke: #ff5722; }
        .node.SQ circle { fill: #f5f5f5; stroke: #757575; }
        .node.RS circle { fill: #fce4ec; stroke: #e91e63; }
        .node.RU circle { fill: #f3e5f5; stroke: #9c27b0; }
        
        /* UCT状态样式 */
        .node.unexplored circle {
            stroke-dasharray: 5,5;  /* 虚线边框表示未探索 */
            opacity: 0.7;
        }
        
        .node.root circle {
            stroke-width: 4px;  /* 加粗边框表示根节点 */
        }
        
        .node:hover circle {
            stroke-width: 3px;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        }
        
        .node.root:hover circle {
            stroke-width: 5px;  /* 根节点悬停时更粗 */
        }
        
        .link {
            fill: none;
            stroke: #9ecae1;
            stroke-width: 2px;
            opacity: 0.7;
        }
        
        .node-text {
            font-size: 11px;
            text-anchor: middle;
            pointer-events: none;
            font-weight: bold;
            fill: #333;
        }
        
        .tooltip {
            position: absolute;
            background: rgba(0, 0, 0, 0.9);
            color: white;
            padding: 8px 10px;
            border-radius: 6px;
            font-size: 12px;
            max-width: 600px;
            max-height: 400px;
            overflow-y: auto;
            z-index: 1000;
            display: none;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            line-height: 1.2;
            white-space: pre-wrap;
        }
        
        .tooltip-title {
            font-weight: bold;
            font-size: 14px;
            margin-bottom: 4px;
            color: #4fc3f7;
        }
        
        .tooltip-content {
            margin-bottom: 1px;
            line-height: 1.2;
        }
        
        .tooltip-content strong {
            color: #81c784;
            margin-right: 2px;
        }
        
        .tooltip-stats {
            display: flex;
            gap: 12px;
            margin-bottom: 4px;
            flex-wrap: wrap;
        }
        
        .tooltip-stat {
            font-size: 11px;
            line-height: 1.1;
        }
        
        .tooltip-content-text {
            margin-top: 4px;
            padding-left: 4px;
            font-size: 11px;
            line-height: 1.2;
            border-left: 2px solid #4fc3f7;
            padding-left: 6px;
        }
        
        .legend {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255,255,255,0.95);
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            font-size: 12px;
            max-width: 250px;
        }
        
        .legend-title {
            font-weight: bold;
            margin-bottom: 10px;
            color: #333;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
        }
        
        .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            margin-right: 8px;
            border: 2px solid;
        }
        
        .legend-color.U { background: #e3f2fd; border-color: #2196f3; }
        .legend-color.TS { background: #e8f5e8; border-color: #4caf50; }
        .legend-color.DA { background: #fff3e0; border-color: #ff5722; }
        .legend-color.SQ { background: #f5f5f5; border-color: #757575; }
        .legend-color.RS { background: #fce4ec; border-color: #e91e63; }
        .legend-color.RU { background: #f3e5f5; border-color: #9c27b0; }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>MCTS推理树可视化 - Question 0000 - Rollout 14-qwen3</h1>
        </div>
        
        <div class="tree-container">
            <div class="legend">
                <div class="legend-title">节点类型</div>
                <div class="legend-item">
                    <div class="legend-color U"></div>
                    <span>User (用户)</span>
                </div>
                <div class="legend-item">
                    <div class="legend-color TS"></div>
                    <span>Thought Step (思考步骤) - A1</span>
                </div>
                <div class="legend-item">
                    <div class="legend-color DA"></div>
                    <span>Direct Answer (直接回答) - A2</span>
                </div>
                <div class="legend-item">
                    <div class="legend-color SQ"></div>
                    <span>Sub Question (子问题) - A3</span>
                </div>
                <div class="legend-item">
                    <div class="legend-color RS"></div>
                    <span>Re-Answer (重新回答) - A4</span>
                </div>
                <div class="legend-item">
                    <div class="legend-color RU"></div>
                    <span>Rephrase User (重述用户) - A5</span>
                </div>
                
                <div class="legend-title" style="margin-top: 15px;">UCT状态</div>
                <div style="font-size: 11px; margin-bottom: 8px;">
                    <div>• 虚线边框：未探索节点 (UCT=999)</div>
                    <div>• 加粗边框：根节点 (UCT=666)</div>
                    <div>• 普通边框：已探索节点 (UCT=数值)</div>
                </div>
            </div>
            
            <div class="tooltip" id="tooltip"></div>
            <svg id="tree-svg"></svg>
        </div>
    </div>

    <script>
        const treeData = {
  "id": "U-0",
  "type": "U",
  "q_value": 10.0,
  "n_visits": 15,
  "v_value": null,
  "uct_value": 666,
  "content": "User: Janet’s ducks lay 16 eggs per day. She eats three for breakfast every morning and bakes muffins for her friends every day with four. She sells the remainder at the farmers' market daily for $2 per fresh duck egg. How much in dollars does she make every day at the farmers' market?",
  "depth": 0,
  "children": [
    {
      "id": "TS-1",
      "type": "TS",
      "q_value": 1.0,
      "n_visits": 2,
      "v_value": null,
      "uct_value": 2.83,
      "content": "OST: Determine how many eggs Janet's ducks lay each day. The problem says they lay 16 eggs per day.",
      "depth": 1,
      "children": [
        {
          "id": "TS-25",
          "type": "TS",
          "q_value": 1.0,
          "n_visits": 1,
          "v_value": null,
          "uct_value": 2.67,
          "content": "OST: Calculate how many eggs Janet uses for breakfast. She eats 3 eggs every morning.",
          "depth": 2,
          "children": [
            {
              "id": "TS-29",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Calculate how many eggs Janet uses for baking muffins. She uses 4 eggs for her friends' muffins.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-30",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Calculate how many eggs Janet uses for baking muffins. She uses 4 eggs for her friends every day.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-31",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Calculate how many eggs Janet uses for baking muffins. She uses 4 eggs for her friends every day.",
              "depth": 3,
              "children": []
            },
            {
              "id": "DA-32",
              "type": "DA",
              "q_value": 1.0,
              "n_visits": 1,
              "v_value": 1.0,
              "uct_value": 1.0,
              "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast. That leaves 16 - 3 = 13 eggs. She also uses 4 eggs to bake muffins. So she has 13 - 4 = 9 eggs left. At $2 per egg, she makes 9 x 2 = $18 per day. The answer is: 18.",
              "depth": 3,
              "children": []
            }
          ]
        },
        {
          "id": "TS-26",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Calculate how many eggs Janet uses for her own consumption. She eats 3 eggs for breakfast every morning.",
          "depth": 2,
          "children": []
        },
        {
          "id": "TS-27",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 1,
          "v_value": null,
          "uct_value": 1.67,
          "content": "OST: Calculate how many eggs Janet uses for breakfast. She eats 3 eggs every morning.",
          "depth": 2,
          "children": [
            {
              "id": "TS-108",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 1,
              "v_value": null,
              "uct_value": 0.0,
              "content": "OST: Calculate how many eggs Janet uses for baking muffins. She uses 4 eggs for her friends.",
              "depth": 3,
              "children": [
                {
                  "id": "TS-112",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Find the total number of eggs used by adding the eggs eaten for breakfast and the eggs used for muffins: 3 (breakfast) + 4 (muffins) = 7 eggs used daily.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-113",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Add the number of eggs used for breakfast and muffins. She uses 3 (breakfast) + 4 (muffins) = 7 eggs daily.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-114",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 1,
                  "v_value": null,
                  "uct_value": 0.0,
                  "content": "OST: Find the total number of eggs used by adding the eggs eaten for breakfast and the eggs used for muffins. That would be 3 + 4 = 7 eggs.",
                  "depth": 4,
                  "children": [
                    {
                      "id": "TS-116",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": null,
                      "uct_value": 999,
                      "content": "OST: Subtract the total number of eggs used from the total number laid to determine how many eggs are sold at the market. This is 16 - 7 = 9 eggs.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "TS-117",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": null,
                      "uct_value": 999,
                      "content": "OST: Subtract the total number of eggs used from the total number of eggs laid to find out how many eggs are left for sale. That would be 16 - 7 = 9 eggs.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "TS-118",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 1,
                      "v_value": null,
                      "uct_value": 0.0,
                      "content": "OST: Subtract the total number of eggs used from the total number of eggs laid to find out how many eggs are sold at the farmers' market. 16 - 7 = 9 eggs.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "DA-119",
                      "type": "DA",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": 1.0,
                      "uct_value": 999,
                      "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for muffins, so 3 + 4 = 7 eggs used. Therefore, 16 - 7 = 9 eggs remain for sale. At $2 per egg, she makes 9 × 2 = $18 per day. The answer is: 18.",
                      "depth": 5,
                      "children": []
                    }
                  ]
                },
                {
                  "id": "DA-115",
                  "type": "DA",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": 1.0,
                  "uct_value": 999,
                  "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 eggs for breakfast and 4 eggs for muffins. That totals 3 + 4 = 7 eggs used. The remaining eggs are 16 - 7 = 9. Each egg is sold for $2, so 9 x 2 = $18. The answer is: 18.",
                  "depth": 4,
                  "children": []
                }
              ]
            },
            {
              "id": "TS-109",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Calculate how many eggs Janet uses for baking muffins. She uses 4 eggs for muffins each day.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-110",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Determine how many eggs Janet uses for baking muffins. She uses 4 eggs per day for muffins.",
              "depth": 3,
              "children": []
            },
            {
              "id": "DA-111",
              "type": "DA",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast. That leaves 16 - 3 = 13 eggs. She also uses 4 eggs for baking muffins. That leaves 13 - 4 = 9 eggs. She sells these 9 eggs at $2 each. 9 x $2 = $18. The answer is: 18.",
              "depth": 3,
              "children": []
            }
          ]
        },
        {
          "id": "DA-28",
          "type": "DA",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Ans: Let's think step by step. Janet's ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for baking muffins. That's 3 + 4 = 7 eggs used per day. So 16 - 7 = 9 eggs remain. These are sold at $2 per egg. So she makes 9 x $2 = $18 per day. The answer is: 18.",
          "depth": 2,
          "children": []
        }
      ]
    },
    {
      "id": "TS-2",
      "type": "TS",
      "q_value": 0.0,
      "n_visits": 1,
      "v_value": null,
      "uct_value": 3.29,
      "content": "OST: Calculate the total number of eggs laid each day. Janet’s ducks lay 16 eggs per day.",
      "depth": 1,
      "children": [
        {
          "id": "TS-9",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 1,
          "v_value": null,
          "uct_value": 0.0,
          "content": "OST: Determine how many eggs Janet uses for her own consumption. She eats 3 eggs for breakfast every morning.",
          "depth": 2,
          "children": [
            {
              "id": "TS-13",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Determine how many eggs are used for baking muffins. She uses 4 eggs for baking muffins every day.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-14",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Determine how many eggs Janet uses for baking muffins. She uses 4 eggs for baking muffins every day.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-15",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 1,
              "v_value": null,
              "uct_value": 0.0,
              "content": "OST: Determine how many eggs Janet uses for baking muffins. She uses 4 eggs for baking muffins each day.",
              "depth": 3,
              "children": [
                {
                  "id": "TS-17",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Add the eggs used for breakfast and muffins. 3 (breakfast) + 4 (muffins) = 7 eggs used daily.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-18",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 1,
                  "v_value": null,
                  "uct_value": 0.0,
                  "content": "OST: Add the number of eggs used for breakfast and muffins to find the total number of eggs consumed by Janet. That would be 3 (breakfast) + 4 (muffins) = 7 eggs.",
                  "depth": 4,
                  "children": [
                    {
                      "id": "TS-21",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": null,
                      "uct_value": 999,
                      "content": "OST: Subtract the number of eggs consumed by Janet from the total number of eggs laid to find out how many eggs are available for sale at the farmers’ market. This would be 16 (total eggs) - 7 (eggs used) = 9 eggs.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "TS-22",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 1,
                      "v_value": null,
                      "uct_value": 0.0,
                      "content": "OST: Subtract the total number of eggs consumed by Janet from the total number of eggs laid to find out how many eggs are available for sale. 16 (total eggs) - 7 (eggs consumed) = 9 eggs.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "TS-23",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": null,
                      "uct_value": 999,
                      "content": "OST: Subtract the number of eggs consumed from the total number of eggs laid to find the number of eggs available for sale at the farmers' market. This is 16 (total eggs) - 7 (eggs used) = 9 eggs.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "DA-24",
                      "type": "DA",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": 1.0,
                      "uct_value": 999,
                      "content": "Ans: Let's think step by step. The ducks lay 16 eggs per day. Janet uses 3 eggs for breakfast and 4 eggs for muffins. That means she consumes 3 + 4 = 7 eggs. Subtracting those from the total, she has 16 - 7 = 9 eggs left to sell. At $2 per egg, she makes 9 x 2 = $18 per day. The answer is: 18.",
                      "depth": 5,
                      "children": []
                    }
                  ]
                },
                {
                  "id": "TS-19",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Add the number of eggs used for breakfast and baking muffins. 3 (breakfast) + 4 (muffins) = 7 eggs used daily.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "DA-20",
                  "type": "DA",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": 1.0,
                  "uct_value": 999,
                  "content": "Ans: Let's think step by step. First, find out how many eggs Janet uses for her own consumption. She eats 3 eggs for breakfast and uses 4 eggs for baking muffins. That means she uses 3 + 4 = 7 eggs daily. Next, subtract the number of eggs used from the total number of eggs laid each day. Janet's ducks lay 16 eggs per day. So, 16 - 7 = 9 eggs remain. Finally, calculate the amount of money made from selling these eggs. She sells each egg for $2, so 9 x $2 = $18. The answer is: 18.",
                  "depth": 4,
                  "children": []
                }
              ]
            },
            {
              "id": "DA-16",
              "type": "DA",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Ans: Let's think step by step. Janet's ducks lay 16 eggs each day. She uses 3 eggs for breakfast. That leaves 16 - 3 = 13 eggs. She also uses 4 eggs for baking muffins. 13 - 4 = 9 eggs remaining. These are sold at $2 per egg. So 9 x $2 = $18. The answer is: 18.",
              "depth": 3,
              "children": []
            }
          ]
        },
        {
          "id": "TS-10",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Determine the number of eggs Janet uses for breakfast. She eats 3 eggs every morning.",
          "depth": 2,
          "children": []
        },
        {
          "id": "TS-11",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Determine the number of eggs used for breakfast. Janet eats 3 eggs for breakfast.",
          "depth": 2,
          "children": []
        },
        {
          "id": "DA-12",
          "type": "DA",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. Janet eats 3 eggs for breakfast. That leaves 16 - 3 = 13 eggs. She uses 4 eggs to bake muffins. That leaves 13 - 4 = 9 eggs. She sells these remaining 9 eggs at $2 each. 9 x 2 = $18. So she makes $18 per day at the farmers’ market. The answer is: 18.",
          "depth": 2,
          "children": []
        }
      ]
    },
    {
      "id": "TS-3",
      "type": "TS",
      "q_value": 0.0,
      "n_visits": 1,
      "v_value": null,
      "uct_value": 3.29,
      "content": "OST: Determine the total number of eggs laid each day, which is 16 eggs.",
      "depth": 1,
      "children": [
        {
          "id": "TS-33",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Calculate the number of eggs Janet uses for breakfast. She eats 3 eggs for breakfast every morning.",
          "depth": 2,
          "children": []
        },
        {
          "id": "TS-34",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 1,
          "v_value": null,
          "uct_value": 0.0,
          "content": "OST: Calculate the number of eggs Janet uses for breakfast. She eats 3 eggs for breakfast.",
          "depth": 2,
          "children": [
            {
              "id": "TS-37",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Calculate the number of eggs used for baking muffins. She uses 4 eggs for muffins.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-38",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 1,
              "v_value": null,
              "uct_value": 0.0,
              "content": "OST: Calculate the number of eggs used for baking muffins. She uses 4 eggs for muffins.",
              "depth": 3,
              "children": [
                {
                  "id": "TS-41",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 1,
                  "v_value": null,
                  "uct_value": 0.0,
                  "content": "OST: Add the eggs eaten for breakfast and muffins to get the total number of eggs used. 3 + 4 = 7 eggs.",
                  "depth": 4,
                  "children": [
                    {
                      "id": "TS-45",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": null,
                      "uct_value": 999,
                      "content": "OST: Subtract the total number of eggs used from the total eggs laid. 16 - 7 = 9 eggs remaining for sale.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "TS-46",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 1,
                      "v_value": null,
                      "uct_value": 0.0,
                      "content": "OST: Subtract the total eggs used from the total eggs laid to find the remaining eggs. 16 - 7 = 9 eggs.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "TS-47",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": null,
                      "uct_value": 999,
                      "content": "OST: Subtract the total eggs used from the total eggs laid to determine the number of eggs sold. 16 - 7 = 9 eggs sold.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "DA-48",
                      "type": "DA",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": 1.0,
                      "uct_value": 999,
                      "content": "Ans: Let's think step by step. Janet's ducks lay 16 eggs per day. She uses 3 eggs for breakfast and 4 eggs for muffins, so 3 + 4 = 7 eggs are used. This leaves 16 - 7 = 9 eggs for sale. At $2 per egg, she makes 9 × $2 = $18 per day. The answer is: 18.",
                      "depth": 5,
                      "children": []
                    }
                  ]
                },
                {
                  "id": "TS-42",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Find out the total number of eggs used by adding the eggs eaten and the eggs baked: 3 (breakfast) + 4 (muffins) = 7 eggs used.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-43",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Add the eggs used for breakfast and muffins: 3 + 4 = 7 eggs used daily.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "DA-44",
                  "type": "DA",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": 1.0,
                  "uct_value": 999,
                  "content": "Ans: Let's think step by step. First, we need to find out how many eggs are sold each day. The ducks lay 16 eggs per day. Janet eats 3 for breakfast and uses 4 for muffins. That totals 3 + 4 = 7 eggs used. So, the remaining eggs for sale would be 16 - 7 = 9 eggs. Each egg is sold for $2, so the total earnings are 9 x $2 = $18. The answer is: 18.",
                  "depth": 4,
                  "children": []
                }
              ]
            },
            {
              "id": "TS-39",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Calculate the number of eggs used for baking muffins. She uses 4 eggs for baking muffins.",
              "depth": 3,
              "children": []
            },
            {
              "id": "DA-40",
              "type": "DA",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Ans: Let's think step by step. First, we know Janet lays 16 eggs per day. She eats 3 eggs for breakfast. That leaves 16 - 3 = 13 eggs. Additionally, she bakes muffins using 4 eggs. 13 - 4 = 9 eggs remaining. At $2 per egg, she makes 9 x 2 = $18 per day. The answer is: 18.",
              "depth": 3,
              "children": []
            }
          ]
        },
        {
          "id": "TS-35",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Calculate the number of eggs Janet uses for her own consumption. She eats 3 eggs for breakfast and uses 4 eggs for muffins. So, she uses 3 + 4 = 7 eggs daily.",
          "depth": 2,
          "children": []
        },
        {
          "id": "DA-36",
          "type": "DA",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for muffins, so that's 3 + 4 = 7 eggs used daily. The remaining eggs are 16 - 7 = 9 eggs. Each egg is sold for $2, so 9 x 2 = $18. The answer is: 18.",
          "depth": 2,
          "children": []
        }
      ]
    },
    {
      "id": "DA-4",
      "type": "DA",
      "q_value": 3.0,
      "n_visits": 3,
      "v_value": 1.0,
      "uct_value": 2.9,
      "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for muffins. That means she uses 3 + 4 = 7 eggs per day. Therefore, the number of eggs she sells is 16 - 7 = 9 eggs. At $2 per egg, she makes 9 * 2 = $18 per day. The answer is: 18.",
      "depth": 1,
      "children": []
    },
    {
      "id": "SQ-5",
      "type": "SQ",
      "q_value": 1.0,
      "n_visits": 2,
      "v_value": 1.0,
      "uct_value": 2.83,
      "content": "Q: How many eggs does Janet use for other purposes?",
      "depth": 1,
      "children": [
        {
          "id": "TS-88",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 1,
          "v_value": null,
          "uct_value": 1.67,
          "content": "OST: Multiply the number of eggs sold by the price per egg, which is 16 (total eggs laid) - 7 (eggs used) = 9 eggs remaining for sale. Then, multiply 9 eggs * $2/egg = $18.",
          "depth": 2,
          "children": [
            {
              "id": "TS-120",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Alternatively, calculate how many eggs Janet uses each day: She uses 3 for breakfast and 4 for muffins, so 3 + 4 = 7 eggs used per day.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-121",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 1,
              "v_value": null,
              "uct_value": 0.0,
              "content": "OST: Janet makes $18 each day at the farmers’ market.",
              "depth": 3,
              "children": [
                {
                  "id": "TS-124",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: The answer is 18.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-125",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: The answer is 18.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-126",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 1,
                  "v_value": null,
                  "uct_value": 0.0,
                  "content": "OST: The answer is 18.",
                  "depth": 4,
                  "children": [
                    {
                      "id": "TS-128",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 1,
                      "v_value": null,
                      "uct_value": 0.0,
                      "content": "OST: Wait, let me check my calculation again. First, calculate the total number of eggs laid per day: 16 eggs.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "TS-129",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": null,
                      "uct_value": 999,
                      "content": "OST: Wait, I need to verify my steps again. Let me re-examine the problem carefully.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "TS-130",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": null,
                      "uct_value": 999,
                      "content": "OST: Wait, let me check again. First, calculate the total eggs laid daily: 16. Next, subtract the eggs used: 16 - 3 (for breakfast) - 4 (for muffins) = 9 eggs. Finally, calculate the earnings: 9 * $2 = $18. Yes, this confirms it.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "DA-131",
                      "type": "DA",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": 1.0,
                      "uct_value": 999,
                      "content": "Ans: Let's think step by steps. Janet's ducks lay 16 eggs per day. She uses 3 eggs for breakfast and 4 for baking muffins, totaling 3 + 4 = 7 eggs. Subtracting these from the total eggs gives 16 - 7 = 9 eggs available for sale. At $2 per egg, the revenue is 9 * 2 = 18. The answer is: 18.",
                      "depth": 5,
                      "children": []
                    }
                  ]
                },
                {
                  "id": "DA-127",
                  "type": "DA",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": 1.0,
                  "uct_value": 999,
                  "content": "Ans: Let's think step by step. First, calculate the number of eggs Janet uses. She eats 3 and uses 4 for muffins, so that’s 3 + 4 = 7 eggs. Subtract this from the total eggs laid, 16 - 7 = 9. Finally, multiply the remaining eggs by the price per egg, 9 * $2 = $18. The answer is: 18.",
                  "depth": 4,
                  "children": []
                }
              ]
            },
            {
              "id": "TS-122",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Janet makes $18 per day at the market.",
              "depth": 3,
              "children": []
            },
            {
              "id": "DA-123",
              "type": "DA",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs each day. She uses 3 for breakfast and 4 for baking muffins, so she uses a total of 3 + 4 = 7 eggs. That leaves 16 - 7 = 9 eggs available for sale. At $2 per egg, she makes 9 * 2 = $18 per day. The answer is: 18.",
              "depth": 3,
              "children": []
            }
          ]
        },
        {
          "id": "TS-89",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Each day, she lays 16 eggs and uses 7 eggs, so the remaining eggs available for sale are 16 - 7 = 9 eggs.",
          "depth": 2,
          "children": []
        },
        {
          "id": "TS-90",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Each day, she lays 16 eggs, so the number of eggs available for sale is 16 - 7 = 9 eggs.",
          "depth": 2,
          "children": []
        },
        {
          "id": "DA-91",
          "type": "DA",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Ans: Let's think step by step. First, we know that Janet’s ducks lay 16 eggs per day. According to Hint 1, Janet uses 7 eggs for other purposes. This leaves 16 - 7 = 9 eggs remaining to sell at the farmers' market. Since she sells these eggs at $2 per egg, the amount she makes is 9 x $2 = $18. The answer is: 18.",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-92",
          "type": "SQ",
          "q_value": 1.0,
          "n_visits": 1,
          "v_value": 1.0,
          "uct_value": 2.67,
          "content": "Q: How many eggs are available for sale at the farmers’ market?",
          "depth": 2,
          "children": [
            {
              "id": "TS-96",
              "type": "TS",
              "q_value": 1.0,
              "n_visits": 1,
              "v_value": null,
              "uct_value": 1.0,
              "content": "OST: Each sold egg brings $2 revenue. Therefore, Janet makes 9 * $2 = $18 every day at the farmers' market.",
              "depth": 3,
              "children": [
                {
                  "id": "TS-104",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Wait, let me check again. First, we need to calculate how many eggs Janet sells each day.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-105",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Wait, but how did I get 9? Let me recheck my calculation. Step 3: First calculate the total number of eggs laid each day. The problem states that Janet’s ducks lay 16 eggs per day.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-106",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Wait, let me retrace my steps. First, we need to calculate the total number of eggs laid each day, then subtract those used by Janet and her muffins, then multiply the remaining eggs by the price per egg.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "DA-107",
                  "type": "DA",
                  "q_value": 1.0,
                  "n_visits": 1,
                  "v_value": 1.0,
                  "uct_value": 1.0,
                  "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for muffins, so that’s 3 + 4 = 7 eggs used daily. This leaves 16 - 7 = 9 eggs to sell. At $2 per egg, she makes 9 * 2 = 18 dollars per day. The answer is: 18.",
                  "depth": 4,
                  "children": []
                }
              ]
            },
            {
              "id": "TS-97",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Each egg is sold for $2, so the income from selling 9 eggs would be 9 * 2 = $18.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-98",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Each egg is sold at $2, so 9 eggs * $2/egg = $18.",
              "depth": 3,
              "children": []
            },
            {
              "id": "DA-99",
              "type": "DA",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 eggs for breakfast and 4 for muffins, totaling 7 eggs used. This leaves 16 - 7 = 9 eggs for sale. At $2 per egg, she makes 9 * 2 = $18. The answer is: 18.",
              "depth": 3,
              "children": []
            },
            {
              "id": "SQ-100",
              "type": "SQ",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers' market?",
              "depth": 3,
              "children": []
            },
            {
              "id": "SQ-101",
              "type": "SQ",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers’ market?",
              "depth": 3,
              "children": []
            },
            {
              "id": "SQ-102",
              "type": "SQ",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers’ market?",
              "depth": 3,
              "children": []
            },
            {
              "id": "RS-103",
              "type": "RS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Re-Ans: Let's think step by step. Janet's ducks lay 16 eggs per day. She uses 3 for breakfast. That leaves 16 - 3 = 13. She also uses 4 for muffins. That leaves 13 - 4 = 9. So there are 9 eggs available for sale at the farmers’ market. The answer is: 9.",
              "depth": 3,
              "children": []
            }
          ]
        },
        {
          "id": "SQ-93",
          "type": "SQ",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Q: How many eggs are available for sale at the farmers' market?",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-94",
          "type": "SQ",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Q: How many eggs are available for sale?",
          "depth": 2,
          "children": []
        },
        {
          "id": "RS-95",
          "type": "RS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 0.9,
          "uct_value": 999,
          "content": "Re-Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for muffins. That's 3 + 4 = 7 eggs used for other purposes. The answer is: 7.",
          "depth": 2,
          "children": []
        }
      ]
    },
    {
      "id": "SQ-6",
      "type": "SQ",
      "q_value": 2.0,
      "n_visits": 2,
      "v_value": 1.0,
      "uct_value": 3.33,
      "content": "Q: How many eggs are sold at the farmers' market?",
      "depth": 1,
      "children": [
        {
          "id": "TS-56",
          "type": "TS",
          "q_value": 1.0,
          "n_visits": 1,
          "v_value": null,
          "uct_value": 2.67,
          "content": "OST: Each egg is sold for $2, so she makes 9 * $2 = $18 per day.",
          "depth": 2,
          "children": [
            {
              "id": "TS-64",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Wait, where did I get 9 from? Let me re-examine the steps.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-65",
              "type": "TS",
              "q_value": 1.0,
              "n_visits": 1,
              "v_value": null,
              "uct_value": 1.0,
              "content": "OST: But wait, we need to calculate the correct number of eggs remaining first.",
              "depth": 3,
              "children": [
                {
                  "id": "TS-68",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Janet's ducks lay 16 eggs per day.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-69",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Determine how many eggs Janet uses each day. She eats 3 for breakfast and uses 4 for muffins. That’s 3 + 4 = 7 eggs used each day.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-70",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Janet’s ducks lay 16 eggs per day.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "DA-71",
                  "type": "DA",
                  "q_value": 1.0,
                  "n_visits": 1,
                  "v_value": 1.0,
                  "uct_value": 1.0,
                  "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 eggs for breakfast and 4 eggs for muffins. That totals 3 + 4 = 7 eggs used daily. Subtracting this from the total eggs laid, we get 16 - 7 = 9 eggs remaining. These 9 eggs are sold at $2 each, so 9 * 2 = $18. The answer is: 18.",
                  "depth": 4,
                  "children": []
                }
              ]
            },
            {
              "id": "TS-66",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: The answer is 18.",
              "depth": 3,
              "children": []
            },
            {
              "id": "DA-67",
              "type": "DA",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for muffins, which totals 3 + 4 = 7 eggs used. This leaves 16 - 7 = 9 eggs to sell. Since each egg is sold for $2, she makes 9 * $2 = $18 per day. The answer is: 18.",
              "depth": 3,
              "children": []
            }
          ]
        },
        {
          "id": "TS-57",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Each egg sells for $2, so 9 x $2 = $18.",
          "depth": 2,
          "children": []
        },
        {
          "id": "TS-58",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Each egg is sold for $2, so she makes 9 * $2 = $18 per day.",
          "depth": 2,
          "children": []
        },
        {
          "id": "DA-59",
          "type": "DA",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Ans: Let's think step by step. Each day, Janet's ducks lay 16 eggs. She eats 3 and uses 4 for muffins, so she sets aside 16 - 3 - 4 = 9 eggs for sale. At $2 per egg, she makes 9 × $2 = $18 per day. The answer is: 18.",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-60",
          "type": "SQ",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers' market?",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-61",
          "type": "SQ",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers' market?",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-62",
          "type": "SQ",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers' market?",
          "depth": 2,
          "children": []
        },
        {
          "id": "RS-63",
          "type": "RS",
          "q_value": 1.0,
          "n_visits": 1,
          "v_value": 1.0,
          "uct_value": 2.67,
          "content": "Re-Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for muffins. That totals 3 + 4 = 7 eggs used per day. So the remaining eggs are 16 - 7 = 9 eggs. Therefore, she sells 9 eggs at the farmers' market. The answer is: 9.",
          "depth": 2,
          "children": [
            {
              "id": "TS-132",
              "type": "TS",
              "q_value": 1.0,
              "n_visits": 1,
              "v_value": null,
              "uct_value": 1.0,
              "content": "OST: Calculate the earnings from selling the eggs. Each egg sells for $2. So, 9 eggs x $2/egg = $18.",
              "depth": 3,
              "children": [
                {
                  "id": "TS-139",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: But wait, we first need to know how many eggs Janet has available to sell each day. She lays 16 eggs per day.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-140",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Janet’s ducks lay 16 eggs per day.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-141",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: The answer is 18.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "DA-142",
                  "type": "DA",
                  "q_value": 1.0,
                  "n_visits": 1,
                  "v_value": 1.0,
                  "uct_value": 1.0,
                  "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for muffins. That means she uses 3 + 4 = 7 eggs. Therefore, she has 16 - 7 = 9 eggs remaining. These 9 eggs are sold at $2 each, so 9 × $2 = $18. The answer is: 18.",
                  "depth": 4,
                  "children": []
                }
              ]
            },
            {
              "id": "TS-133",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Each egg is sold for $2. Therefore, the total income is 9 eggs × $2/egg = $18.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-134",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Each egg sells for $2, so she makes 9 * 2 = $18 per day.",
              "depth": 3,
              "children": []
            },
            {
              "id": "DA-135",
              "type": "DA",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 0.78,
              "uct_value": 999,
              "content": "Ans: Let's think step by step. Janet’s ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for muffins. That totals 3 + 4 = 7 eggs used per day. So the remaining eggs are 16 - 7 = 9 eggs. Therefore, she sells 9 eggs at the farmers' market. The answer is: 9.",
              "depth": 3,
              "children": []
            },
            {
              "id": "SQ-136",
              "type": "SQ",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers' market?",
              "depth": 3,
              "children": []
            },
            {
              "id": "SQ-137",
              "type": "SQ",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Q: How much money does Janet make from selling the eggs at the farmers' market?",
              "depth": 3,
              "children": []
            },
            {
              "id": "SQ-138",
              "type": "SQ",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers' market?",
              "depth": 3,
              "children": []
            }
          ]
        }
      ]
    },
    {
      "id": "SQ-7",
      "type": "SQ",
      "q_value": 2.0,
      "n_visits": 2,
      "v_value": 1.0,
      "uct_value": 3.33,
      "content": "Q: How many eggs are left for sale every day?",
      "depth": 1,
      "children": [
        {
          "id": "TS-72",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: She sells these 9 eggs at $2 each. Therefore, her earnings are 9 * $2 = $18 per day.",
          "depth": 2,
          "children": []
        },
        {
          "id": "TS-73",
          "type": "TS",
          "q_value": 1.0,
          "n_visits": 1,
          "v_value": null,
          "uct_value": 2.67,
          "content": "OST: Each egg is sold at $2. Therefore, the amount she makes from selling the eggs is 9 * $2 = $18.",
          "depth": 2,
          "children": [
            {
              "id": "TS-80",
              "type": "TS",
              "q_value": 1.0,
              "n_visits": 1,
              "v_value": null,
              "uct_value": 1.0,
              "content": "OST: However, first we need to determine how many eggs are available for sale each day.",
              "depth": 3,
              "children": [
                {
                  "id": "TS-84",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Janet’s ducks produce 16 eggs daily.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-85",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Janet’s ducks lay 16 eggs per day.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-86",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Janet's ducks lay 16 eggs per day.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "DA-87",
                  "type": "DA",
                  "q_value": 1.0,
                  "n_visits": 1,
                  "v_value": 1.0,
                  "uct_value": 1.0,
                  "content": "Ans: Let's think step by step. Janet's ducks lay 16 eggs per day. She uses 3 for breakfast and 4 for muffins. That totals 3 + 4 = 7 eggs used. Subtracting these from the total, 16 - 7 = 9 eggs remain for sale. At $2 per egg, she earns 9 * 2 = $18. The answer is: 18.",
                  "depth": 4,
                  "children": []
                }
              ]
            },
            {
              "id": "TS-81",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Wait, but first we need to determine how many eggs are available for sale each day.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-82",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Wait, I need to determine the number of eggs Janet sells at the market first.",
              "depth": 3,
              "children": []
            },
            {
              "id": "DA-83",
              "type": "DA",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Ans: Let's think step by step. Janet's ducks lay 16 eggs per day. She uses 3 eggs for breakfast and 4 for baking muffins, totaling 3 + 4 = 7 eggs used. That leaves 16 - 7 = 9 eggs to sell. At $2 per egg, she earns 9 x 2 = $18. The answer is: 18.",
              "depth": 3,
              "children": []
            }
          ]
        },
        {
          "id": "TS-74",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Since each egg is sold for $2, she earns 9 * $2 = $18 per day.",
          "depth": 2,
          "children": []
        },
        {
          "id": "DA-75",
          "type": "DA",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Ans: Let's think step by step. Janet has 16 eggs laid each day. She eats 3 for breakfast and uses 4 for muffins. This leaves 16 - 3 - 4 = 9 eggs available for sale. These 9 eggs are sold at $2 each. Therefore, Janet earns 9 * $2 = $18. The answer is: 18.",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-76",
          "type": "SQ",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers' market?",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-77",
          "type": "SQ",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers' market?",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-78",
          "type": "SQ",
          "q_value": 1.0,
          "n_visits": 1,
          "v_value": 1.0,
          "uct_value": 2.67,
          "content": "Q: Now we can answer the question: How much in dollars does she make every day at the farmers' market?",
          "depth": 2,
          "children": []
        },
        {
          "id": "RS-79",
          "type": "RS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Re-Ans: Let's think step by by step. ",
          "depth": 2,
          "children": []
        }
      ]
    },
    {
      "id": "RU-8",
      "type": "RU",
      "q_value": 1.0,
      "n_visits": 2,
      "v_value": null,
      "uct_value": 2.83,
      "content": "Reph-User: Given a list of conditions, please answer the question. Condition 1: 16 eggs are laid by Janet’s ducks each day. Condition 2: Janet consumes 3 eggs for breakfast. Condition 3: She uses 4 eggs to bake muffins for her friends. Condition 4: The remaining eggs are sold at the farmers' market at a price of $2 per egg. Question: What is the daily income from the sale of eggs at the farmers' market?",
      "depth": 1,
      "children": [
        {
          "id": "TS-49",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Determine the total number of eggs laid daily by Janet’s ducks. According to condition 1, Janet’s ducks lay 16 eggs each day.",
          "depth": 2,
          "children": []
        },
        {
          "id": "TS-50",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 1,
          "v_value": null,
          "uct_value": 1.67,
          "content": "OST: Determine the total number of eggs laid daily, which is 16 according to Condition 1.",
          "depth": 2,
          "children": [
            {
              "id": "TS-143",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Calculate the total number of eggs consumed by Janet. She consumes 3 eggs for breakfast and uses 4 eggs for baking muffins. So, she uses 3 + 4 = 7 eggs in total.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-144",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": null,
              "uct_value": 999,
              "content": "OST: Calculate the total number of eggs used by Janet. She consumes 3 eggs for breakfast and uses 4 eggs for baking muffins. Therefore, she uses 3 + 4 = 7 eggs.",
              "depth": 3,
              "children": []
            },
            {
              "id": "TS-145",
              "type": "TS",
              "q_value": 0.0,
              "n_visits": 1,
              "v_value": null,
              "uct_value": 0.0,
              "content": "OST: Subtract the number of eggs consumed for breakfast. Janet uses 3 eggs for breakfast, so 16 - 3 = 13 eggs remain.",
              "depth": 3,
              "children": [
                {
                  "id": "TS-147",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Subtract the number of eggs used for baking muffins. She uses 4 eggs for baking, so 13 - 4 = 9 eggs remain.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-148",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": null,
                  "uct_value": 999,
                  "content": "OST: Subtract the number of eggs used for baking muffins. Janet uses 4 eggs for muffins, so 13 - 4 = 9 eggs remain.",
                  "depth": 4,
                  "children": []
                },
                {
                  "id": "TS-149",
                  "type": "TS",
                  "q_value": 0.0,
                  "n_visits": 1,
                  "v_value": null,
                  "uct_value": 0.0,
                  "content": "OST: Subtract the number of eggs used for baking muffins. Janet uses 4 eggs for muffins, so 13 - 4 = 9 eggs remain.",
                  "depth": 4,
                  "children": [
                    {
                      "id": "TS-151",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": null,
                      "uct_value": 999,
                      "content": "OST: Calculate the daily income from selling the remaining eggs. Each egg sells for $2, so 9 eggs × $2/egg = $18.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "TS-152",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 1,
                      "v_value": null,
                      "uct_value": 0.0,
                      "content": "OST: Calculate the daily income from selling the remaining eggs. With 9 eggs left and each sold for $2, the income is 9 * $2 = $18.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "TS-153",
                      "type": "TS",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": null,
                      "uct_value": 999,
                      "content": "OST: Calculate the daily income by multiplying the remaining eggs by the price per egg. There are 9 eggs left, and each egg is sold for $2, so 9 × $2 = $18.",
                      "depth": 5,
                      "children": []
                    },
                    {
                      "id": "DA-154",
                      "type": "DA",
                      "q_value": 0.0,
                      "n_visits": 0,
                      "v_value": 1.0,
                      "uct_value": 999,
                      "content": "Ans: Let's think step by step. According to condition 1, Janet's ducks lay 16 eggs each day. Janet consumes 3 eggs for breakfast, leaving 16 - 3 = 13 eggs. She also uses 4 eggs for baking muffins, leaving 13 - 4 = 9 eggs. These 9 eggs are sold at $2 per egg, so the daily income is 9 * 2 = $18. The answer is: 18.",
                      "depth": 5,
                      "children": []
                    }
                  ]
                },
                {
                  "id": "DA-150",
                  "type": "DA",
                  "q_value": 0.0,
                  "n_visits": 0,
                  "v_value": 1.0,
                  "uct_value": 999,
                  "content": "Ans: Let's think step by step. The total number of eggs laid daily is 16. Janet consumes 3 eggs for breakfast, leaving 16 - 3 = 13 eggs. She also uses 4 eggs to bake muffins, so 13 - 4 = 9 eggs are left. These 9 eggs are sold at $2 per egg, so 9 * 2 = $18. The answer is: 18.",
                  "depth": 4,
                  "children": []
                }
              ]
            },
            {
              "id": "DA-146",
              "type": "DA",
              "q_value": 0.0,
              "n_visits": 0,
              "v_value": 1.0,
              "uct_value": 999,
              "content": "Ans: Let's think step by step. First, we know that Janet's ducks lay 16 eggs each day. Next, we need to account for the eggs that are consumed or used. Janet uses 3 eggs for breakfast and 4 eggs for baking muffins, so that's 3 + 4 = 7 eggs used. Subtracting these from the total eggs laid gives us 16 - 7 = 9 eggs remaining. These 9 eggs are sold at $2 per egg, so the daily income would be 9 x $2 = $18. The answer is: 18.",
              "depth": 3,
              "children": []
            }
          ]
        },
        {
          "id": "TS-51",
          "type": "TS",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": null,
          "uct_value": 999,
          "content": "OST: Find out how many eggs are laid by Janet's ducks daily. According to condition 1, this is 16 eggs.",
          "depth": 2,
          "children": []
        },
        {
          "id": "DA-52",
          "type": "DA",
          "q_value": 1.0,
          "n_visits": 1,
          "v_value": 1.0,
          "uct_value": 2.67,
          "content": "Ans: Let's think step by step. From condition 1, Janet’s ducks lay 16 eggs each day. From condition 2, she uses 3 eggs for breakfast. From condition 3, she uses 4 eggs to bake muffins. That means she uses a total of 3 + 4 = 7 eggs. So the number of eggs left for sale is 16 - 7 = 9 eggs. From condition 4, these eggs are sold at $2 per egg. Therefore, her daily income would be 9 x $2 = $18. The answer is: 18.",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-53",
          "type": "SQ",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Q: How many eggs are used up (not available for sale) each day?",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-54",
          "type": "SQ",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Q: How many eggs does Janet have after using some for consumption and baking?",
          "depth": 2,
          "children": []
        },
        {
          "id": "SQ-55",
          "type": "SQ",
          "q_value": 0.0,
          "n_visits": 0,
          "v_value": 1.0,
          "uct_value": 999,
          "content": "Q: How many eggs are not consumed or used by Janet each day?",
          "depth": 2,
          "children": []
        }
      ]
    }
  ]
};
        
        // 设置SVG尺寸
        const container = document.querySelector('.tree-container');
        const width = container.clientWidth;
        const height = container.clientHeight;
        
        const svg = d3.select('#tree-svg')
            .attr('width', width)
            .attr('height', height);
        
        const g = svg.append('g');
        
        // 创建树布局
        const tree = d3.tree()
            .size([width - 100, height - 100])
            .separation((a, b) => {
                return a.parent === b.parent ? 1.5 : 2;
            });
        
        // 转换数据
        const root = d3.hierarchy(treeData);
        tree(root);
        
        // 调整位置
        root.each(d => {
            d.x += 50;
            d.y += 50;
        });
        
        // 绘制连线
        g.selectAll('.link')
            .data(root.links())
            .enter()
            .append('path')
            .attr('class', 'link')
            .attr('d', d3.linkVertical()
                .x(d => d.x)
                .y(d => d.y)
            );
        
        // 绘制节点
        const nodes = g.selectAll('.node')
            .data(root.descendants())
            .enter()
            .append('g')
            .attr('class', d => {
                let classes = `node ${d.data.type}`;
                // 根据UCT值添加状态类
                if (d.data.uct_value === 999) {
                    classes += ' unexplored';
                } else if (d.data.uct_value === 666) {
                    classes += ' root';
                }
                return classes;
            })
            .attr('transform', d => `translate(${d.x},${d.y})`);
        
        nodes.append('circle');
        
        nodes.append('text')
            .attr('class', 'node-text')
            .attr('dy', 4)
            .text(d => d.data.id);
        
        // 添加工具提示
        const tooltip = d3.select('#tooltip');
        let tooltipTimeout;
        
        // 鼠标悬停显示完整信息
        nodes.on('mouseover', function(event, d) {
            clearTimeout(tooltipTimeout);
            
            // 格式化UCT值显示
            let uctDisplay;
            if (d.data.uct_value === 999) {
                uctDisplay = 'Unexplored';  // 未探索节点
            } else if (d.data.uct_value === 666) {
                uctDisplay = 'Root';        // 根节点
            } else if (d.data.uct_value === -999) {
                uctDisplay = '-Inf';
            } else {
                uctDisplay = d.data.uct_value.toFixed(2);
            }
            
            const content = `
                <div class="tooltip-title">${d.data.id} (${d.data.type})</div>
                <div class="tooltip-stats">
                    <div class="tooltip-stat"><strong>Q:</strong>${d.data.q_value.toFixed(2)}</div>
                    <div class="tooltip-stat"><strong>N:</strong>${d.data.n_visits}</div>
                    <div class="tooltip-stat"><strong>V:</strong>${d.data.v_value !== null ? d.data.v_value.toFixed(2) : 'None'}</div>
                    <div class="tooltip-stat"><strong>UCT:</strong>${uctDisplay}</div>
                </div>
                <div class="tooltip-content-text">${d.data.content}</div>
            `;
            
            tooltip.html(content)
                .style('display', 'block')
                .style('left', Math.min(event.pageX + 10, window.innerWidth - 620) + 'px')
                .style('top', Math.min(event.pageY - 10, window.innerHeight - 420) + 'px');
        })
        .on('mouseout', function() {
            tooltipTimeout = setTimeout(() => {
                if (tooltip.style('display') === 'block') {
                    // 检查鼠标是否在tooltip上
                    const tooltipElement = document.getElementById('tooltip');
                    if (!tooltipElement.matches(':hover')) {
                        tooltip.style('display', 'none');
                    }
                }
            }, 300);
        });
        

        
        // 鼠标进入tooltip时保持显示
        tooltip.on('mouseenter', function() {
            clearTimeout(tooltipTimeout);
        })
        .on('mouseleave', function() {
            tooltip.style('display', 'none');
        });
        
        // 添加缩放和拖拽
        const zoom = d3.zoom()
            .scaleExtent([0.1, 3])
            .on('zoom', function(event) {
                g.attr('transform', event.transform);
            });
        
        svg.call(zoom);
        
        // 适应窗口大小变化
        window.addEventListener('resize', function() {
            const newWidth = container.clientWidth;
            const newHeight = container.clientHeight;
            svg.attr('width', newWidth).attr('height', newHeight);
            
            tree.size([newWidth - 100, newHeight - 100]);
            tree(root);
            
            root.each(d => {
                d.x += 50;
                d.y += 50;
            });
            
            g.selectAll('.link')
                .attr('d', d3.linkVertical()
                    .x(d => d.x)
                    .y(d => d.y)
                );
            
            g.selectAll('.node')
                .attr('transform', d => `translate(${d.x},${d.y})`);
        });
    </script>
</body>
</html>
    